
pkgname=mkinitcpio
pkgver=24
pkgrel=1
pkgdesc="Modular initramfs image creation utility"
arch=('x86_64')
url="https://projects.archlinux.org/mkinitcpio.git/"
license=('GPL')
depends=('awk' 'mkinitcpio-busybox' 'kmod' 'util-linux' 'libarchive' 'coreutils'
         'bash' 'findutils' 'grep' 'filesystem>=2016.11' 'gzip' 'systemd')
optdepends=('xz: Use lzma or xz compression for the initramfs image'
            'bzip2: Use bzip2 compression for the initramfs image'
            'mkinitcpio-nfs-utils: Support for root filesystem on NFS')
backup=('etc/mkinitcpio.conf')
source=("https://sources.archlinux.org/other/mkinitcpio/${pkgname}-${pkgver}.tar.gz"
        'init.diff'
        'restore-modules.patch')
install=mkinitcpio.install
md5sums=('11ddb115620737867949fd7f6fec4cd0'
         '5bce3b1cf3de654151d5522086431624'
         '7848b40d97f0f0f8dafd8dbcce7a4fb0')

build() {
  cd ${pkgname}-${pkgver}
  
  patch -p0 -i ${srcdir}/init.diff
  patch -p1 -i ${srcdir}/restore-modules.patch
}

package() {
   make -C ${pkgname}-${pkgver} DESTDIR=${pkgdir} install
}

